/**
  ******************************************************************************
  * @author     Chris
  * @since      2024/6/28 15:40
  *
  * @file       pd_iwdg.h
  * @brief      Header file of Xxx hardware driver.
  *
  * @note       This file contains the Xxx object declaration.
  *
  * @warning    None.
  ******************************************************************************
  * Change Logs:
  *   Date          Author       Notes
  *   2024/6/28     Chris        the first version
  *
  ******************************************************************************
  */


#ifndef JLC_SKY_IWDG_H
#define JLC_SKY_IWDG_H

#include "pd_wdg.h"
#include "drivers.h"

typedef struct IndepWDGDef IndepWDG;

struct IndepWDGDef {
    WDG wdg;

    IWDG_TypeDef *IWDGx;
    uint32_t Prescaler;
    uint32_t milliseconds;  // max feed dogs time
};

extern const struct IndepWDGClass {
    IndepWDG *(*build)(IWDG_TypeDef *IWDGx, uint32_t Prescaler, uint32_t milliseconds);
} IndepWDGBuilder;

#endif //JLC_SKY_IWDG_H
